home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / boot / netBoot / sun3.md / dpy.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-08-14  |  3.0 KB  |  112 lines

  1.  
  2. /*    @(#)dpy.h 1.1 86/09/27 SMI    */
  3.  
  4. /*
  5.  * Copyright (c) 1986 by Sun Microsystems, Inc.
  6.  */
  7.  
  8. /* dpy header file */
  9.  
  10. /* shades */
  11. #define    CLEAR        0x0
  12. #define    GRAY        0xaaaa
  13. #define    FILLED        0xffff
  14.  
  15. /* character dimensions (Gallant font) */
  16. #define    CHRHEIGHT    22
  17. #define    CHRWIDTH    12
  18. #define    CHRSHORTS    22    /* including top & bottom blank lines */
  19. #define    CHRBYTES    (CHRSHORTS*2)
  20.  
  21. /* Terminal emulator screen size in characters */
  22. #define    TOP        0
  23. #ifdef SIRIUS
  24. #define BOTTOM          (gp->g_bottom)
  25. #define    RIGHT        (gp->g_right)
  26. #else
  27. #define    BOTTOM        34
  28. #define RIGHT           80
  29. #endif SIRIUS
  30. #define    LEFT        0
  31.  
  32. /*
  33.  * Sun-2 frame buffer constants
  34.  */
  35.  
  36. /* RasterOp functions and negator */
  37. #define    POX_SRC        PIX_SRC
  38. #define    POX_DST        PIX_DST
  39. #define    POX_CLR        PIX_CLR
  40. #define    POX_SET        PIX_SET
  41. #define    POX_NOT(x)    PIX_NOT(x)
  42.  
  43. /*
  44.  * Support both frame buffers, use variables for this stuff.
  45.  */
  46. #define SCRWIDTH    (gp->g_scrwidth)
  47. #define    SCRHEIGHT    (gp->g_scrheight)
  48. #define    WINTOP        (gp->g_wintop)
  49. #define WINLEFT        (gp->g_winleft)
  50.  
  51. #ifdef SIRIUS
  52. #define WINBOT        (gp->g_winbot)
  53. #endif SIRIUS
  54.  
  55. /* Size of bit map used to store compressed font */
  56. /* CHRHEIGHT pixel rows, except top and bottom (-2), times # chars in font 
  57.    (96) divided by bits per byte (8).                        */
  58. #define    FBITMAPSIZE    ((CHRHEIGHT-2)*96/8)
  59.  
  60. /* cursor states */
  61. #define    NOCURSOR    0    /* No cursor is visible */
  62. #define    BLOCKCURSOR    1    /* Cursor is an inverting block */
  63.  
  64. /* terminal states */
  65. #define    ALPHA        0    /* In normal state -- display chars */
  66. #define    SKIPPING    1    /* In CSI sequence to be skipped */
  67. #define    ESCBRKT        2    /* In CSI sequence */
  68. #define    GRAPH        3    /* In graphics mode */
  69. #define    PNT        4    /* In point-plotting mode */
  70. #define    INC        5    /* In incremental plot mode */
  71. #define    ESC        0x80    /* OR-ed in if an ESC char seen */
  72.  
  73. /* Bresenham code constants - keep up to date with bres.s */
  74. #define    BRESIZ        10    /* number of shorts in bres code */
  75. #define    BRESMINOR    0    /* location of minor command in bres code */
  76. #define    BRESMAJOR    1    /* location of major command in bres code */
  77.  
  78. /* Easy access to dpy's variables in globram */
  79. #define    fbpr        (gp->g_fbpr)
  80. #define    fbpos        (gp->g_fbpos)
  81. #define    fbdata        (gp->g_fbdata)
  82. #define    charpr        (gp->g_charpr)
  83. #define    charpos        (gp->g_charpos)
  84. #define    chardata    (gp->g_chardata)
  85. #define    GXBase        ((int)(gp->g_fbdata.md_image))
  86. #define    fbaddr        ((int)(gp->g_fbdata.md_image))
  87. #define    font        (gp->g_font)
  88. #define    ax        (gp->g_ax)
  89. #define    ay        (gp->g_ay)
  90. #define    gx        (gp->g_gx)
  91. #define    gy        (gp->g_gy)
  92. #define    gxhi        (gp->g_gxhi)
  93. #define    gxlo        (gp->g_gxlo)
  94. #define    gyhi        (gp->g_gyhi)
  95. #define    gylo        (gp->g_gylo)
  96. #define    escape        (gp->g_escape)
  97. #define    chrfunc        (gp->g_chrfunc)
  98. #define    vectfunc    (gp->g_vectfunc)
  99. #define    fillfunc    (gp->g_fillfunc)
  100. #define    state        (gp->g_state)
  101. #define    pendown        (gp->g_pendown)
  102. #define    cursor        (gp->g_cursor)
  103. #define    yloseen        (gp->g_yloseen)
  104. #define    ac        (gp->g_ac)
  105. #define    ac0        (gp->g_ac0)
  106. #define    acinit        (gp->g_acinit)
  107. #define    bresw(n)    (gp->g_bresw[n])
  108. #define    dcax        (gp->g_dcax)
  109. #define    dcay        (gp->g_dcay)
  110. #define    dcok        (gp->g_dcok)
  111. #define    scrlins        (gp->g_scrlins)
  112.